package com.kb.controller.crm;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kb.common.MeException;
import com.kb.dto.InvoiceSearchDTO;
import com.kb.dto.crm.YLCrmInfo;
import com.kb.entity.crm.Invoice;
import com.kb.service.crm.KBEService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * crm 通用类
 */
@Controller
@RequestMapping("/crm")
@Api(value = "crm 通用类", tags = {"crm 通用类"})
@Slf4j
public class CrmCommon {
    @Resource
    private KBEService kbeService;

    /**
     * 获取客户数据
     */
    @PostMapping("/getCrmCustomer")
    @ResponseBody
    @ApiOperation("获取开票分页信息")
    public List<YLCrmInfo> getCrmCustomer(@RequestBody YLCrmInfo ylCrmInfo) throws MeException {
        return kbeService.getCrmCustomer(ylCrmInfo);
    }
}
